package com.itheima.day05_多态和内部类.develophomework01.homework01;

public class Test01 {
    public static void main(String[] args) {
        AmeriacanPeople a = new AmeriacanPeople();
        a.height=180;
        //a.setWeight(70);
        a.weight=70;
        a.speakHello();
        a.averageHeight();
        a.averageWeight();
        a.ameriacanBoxing();
    }
}
abstract class People{
    protected double height;
    protected double weight;

    public People() {
    }

    public People(double height, double weight) {
        this.height = height;
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public abstract void speakHello();
    public abstract void averageHeight();
    public abstract void averageWeight();
}
class ChinesePeople extends People{
    public void chinaKongfu(){
        System.out.println("咏春");
    }

    @Override
    public void speakHello() {
        System.out.println("中国人说你好");
    }

    @Override
    public void averageHeight() {
        System.out.println("中国人平均身高"+getHeight());
    }

    @Override
    public void averageWeight() {
        System.out.println("中国人平均体重"+getWeight());
    }
}
class AmeriacanPeople extends People{
    public void ameriacanBoxing(){
        System.out.println("组合拳");
    }

    @Override
    public void speakHello() {
        System.out.println("美国人say hello");
    }

    @Override
    public void averageHeight() {
        System.out.println("美国人平均身高"+getHeight());
    }

    @Override
    public void averageWeight() {
        System.out.println("美国人平均体重"+getWeight());
    }
}